<?php
namespace app\wxapp\controller;

use app\common\entity\BackResult;
use app\common\service\StudyPlanService;
use app\common\model\StudyPlan as StudyPlanModel;
use app\Request;

class StudyPlan extends Base {


    public function index(Request $request){
        $page = $request->param('page',1);
        $pageSize = $request->param('pageSize',10);
        $service = new StudyPlanService();
        $where = ['uid'=>$this->user['id'],'type'=>StudyPlanModel::TOPIC];
        
        $data = $service->getList($page,$pageSize,$where);
        return BackResult::success($data);
    }
}